#include "mylabel.h"

MyLabel::MyLabel( QWidget *parent) : QLabel(parent)
{
//    this->setFixedSize(wid, hig);
//    this->setText("取消激活");
//    this->setText("导入授权文件");
    this->setAlignment(Qt::AlignAbsolute);
    this->setFocusPolicy(Qt::NoFocus);
    QPalette pe;
    pe.setColor(QPalette::Text, QColor(55,144,250));
    this->setPalette(pe);
}

void MyLabel::mouseReleaseEvent(QMouseEvent *e)
{
    emit Clicked(this);
}

void MyLabel::enterEvent(QEvent *e)
{
    Q_UNUSED(e)
    QPalette pe;
    pe.setColor(QPalette::Text, QColor(0, 159, 232));
    this->setPalette(pe);
}

void MyLabel::leaveEvent(QEvent *e)
{
    Q_UNUSED(e)
    QPalette pe;
    pe.setColor(QPalette::Text, QColor(55,144,250));
    this->setPalette(pe);
}
